home *** CD-ROM | disk | FTP | other *** search
/ Hackers Magazine 57 / CdHackersMagazineNr57.iso / Software / Programming / RJTextEd.exe / {userappdata} / RJ TextEd / Syntax / Haskell.ini < prev    next >
Encoding:
INI File  |  2009-09-10  |  837 b   |  39 lines

  1. [MultiHighlight]
  2. Syntax=Haskell
  3. File=Haskell.syx
  4.  
  5. [Comment]
  6. 1=<b>Syntax:Haskell</b>
  7. 2=<b>Author:Marisano James</b>
  8. 3=<b>Version:0.999</b>
  9. 4=<b>Date:2009-09-09</b>
  10. 5=
  11. 6=<b>Recommended colors:See the Haskell.ssx file</b>
  12. 7=
  13. 8=
  14.  
  15. [Sample]
  16. 1=maximum' :: (Ord a) => [a] -> a
  17. 2=maximum' [] = error "maximum of empty list"
  18. 3=maximum' [x] = x
  19. 4=maximum' (x:xs)
  20. 5=| x > maxTail = x
  21. 6=| otherwise = maxTail
  22. 7=where maxTail = maximum' xs
  23. 8=
  24. 9=
  25. 10=maximum'' :: (Ord a) => [a] -> a
  26. 11=maximum'' [] = error "maximum of an error list"
  27. 12=maximum'' [x] = x
  28. 13=maximum'' (x:xs) = max x (maximum xs)
  29. 14=-- This is a comment
  30. 15=
  31. 16=initials :: String -> String -> String
  32. 17=initials firstname lastname = [f] ++ ". " ++ [l] ++ "."
  33. 18=where (f:_) = firstname
  34. 19=(l:_) = lastname
  35. 20=
  36. 21={- I am a
  37. 22=multiline comment -}
  38.  
  39.